﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ARR.Entities.ComponentModel;
using ARR.Entities.Validation;
using System.Runtime.Serialization;

namespace ARR.Entities
{
    public partial class UnitOfMeasureConvertion
    {
        [DataMember]
        public string DisplayName
        {
            get
            {
                return string.Format("1 {0} = {1} {2}", TargetUnit, Value.ToString(Constants.StringFormats.NumberTwoDecimals), SourceUnit);
            }
            set { }
        }

        protected override List<ValidationBase> SetValidations()
        {
            List<ValidationBase> inputValidations = (new UnitOfMeasureInputValidations(this)).CreateValidations();

            return inputValidations;
        }
    }
}
